<?php 
defined('RUN_KATANA') or die('Restricted access');
require_once(str_replace('//','/',dirname(__FILE__).'/').'siteId.php');
defined('SITE_ID') or die('Site Undefined');

if(file_exists(dirname(__FILE__).'/sites/'.SITE_ID.'/site.php'))
{ require(dirname(__FILE__).'/sites/'.SITE_ID.'/site.php'); }
else
{ die('Site Unconfigured'); }

if(file_exists(dirname(__FILE__).'/sites/'.SITE_ID.'/db.php'))
{ require(dirname(__FILE__).'/sites/'.SITE_ID.'/db.php'); }
else
{ die('Database Unconfigured'); }

if(file_exists(dirname(__FILE__).'/sites/'.SITE_ID.'/users.php'))
{ require(dirname(__FILE__).'/sites/'.SITE_ID.'/users.php'); }
else
{ require(dirname(__FILE__).'/sites/default/users.php'); }

if(file_exists(dirname(__FILE__).'/sites/'.SITE_ID.'/globs.php'))
{ require(dirname(__FILE__).'/sites/'.SITE_ID.'/globs.php'); }
else
{ require(dirname(__FILE__).'/sites/default/globs.php'); }


if(file_exists(dirname(__FILE__).'/sites/'.SITE_ID.'/vars.php'))
{ require(dirname(__FILE__).'/sites/'.SITE_ID.'/vars.php'); }
else
{ require(dirname(__FILE__).'/sites/default/vars.php'); }

if(intval($_REQUEST['iframe']) > 0)
{ define('RUN_IFRAME', true); }
?>